﻿using StarsAdmin.Core.Enums;
using System.ComponentModel.DataAnnotations;

namespace StarsAdmin.Core.Models
{
    /// <summary>
    /// 搜索参数对象
    /// </summary>
    public class QueryCondition
    {
        /// <summary>
        /// 参数名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 运算符
        /// </summary>
        [Required]
        public Operators Operator { get; set; }

        /// <summary>
        /// 默认参数值
        /// </summary>
        [Required]
        public object Value { get; set; }

        /// <summary>
        /// 用于范围查询的第二个值
        /// </summary>
        public object? SecondValue { get; set; }
    }
}